﻿namespace CRM.Business.Services
{
    using System.Collections.Generic;
    using CRM.DataAccess.DAOs;
    using CRM.DataAccess.Entities;
    using System;

    public static class DescriptionDetailService
    {
        private static DescriptionDetailDAO DescriptionDetailDAO = new DescriptionDetailDAO();

        //Get Description Detail
        public static List<DESCRIPTION_DETAILS> GetAllDescriptionDetails()
        {
            return DescriptionDetailDAO.GetAllDescriptionDetails();
        }
        //Get Description by ID
        public static DESCRIPTION_DETAILS GetDescriptionByID(long id)
        {
            return DescriptionDetailDAO.GetDescriptionByID(id);
        }
        //delete Description
        public static int DeleteDescription(long id)
        {
            return DescriptionDetailDAO.DeleteDescription(id);
        }
        //update Description
        public static int UpdateDescription(DESCRIPTION_DETAILS Description)
        {
            return DescriptionDetailDAO.UpdateDescription(Description);
        }
        // get Description by condition
        public static List<DESCRIPTION_DETAILS> GetDescriptionByCondition(DateTime? dateFrom, DateTime? dateTo, string DesName)
        {
            return DescriptionDetailDAO.GetDescriptionByCondition(dateFrom, dateTo, DesName);
        }
        // add new Description
        public static int AddNewDescription(DESCRIPTION_DETAILS Description)
        {
            return DescriptionDetailDAO.AddNewDescription(Description);
        }
        //Check exist
        public static int CheckExist(string DescriptionName)
        {
            return DescriptionDetailDAO.CheckExist(DescriptionName);
        }

    }
}
